package com.syedu.day04.homework;

/**
 * description：
 * 键盘输入三个整数,编写三个数值的排序程序
 *
 * @author Administrator
 * @date 2022/3/8 16:20
 */
public class SortNumber {
    public static void main(String[] args) {
        sortMaxToMin(10,5,20);
    }

    /**
     * 从大到小排序三个数字
     */
    public static void sortMaxToMin(int a, int b, int c) {
        if (a < b) {
            int temp = a;
            a = b;
            b = temp;
        }
        if (a < c) {
            int temp = a;
            a = c;
            c = temp;
        }

        if (b < c) {
            int temp = b;
            b = c;
            c = temp;
        }
        System.out.println(a + "," + b + "," + c);
    }
}